<template>
	<zq-page>
		<zq-navbar v-model="scrollTop" :props="{'navbarTitle':'zq组件库'}"></zq-navbar>
		<zq-sudoku :list="sudokuList"></zq-sudoku>
		<!-- <view class="box1" @click="showpop" id="box">
			<view class="box1" @click="showpop" :style="{'position':'fixed',top:adsorbs['#box'].top + 'rpx'}" v-if="adsorbs['#box'] && adsorbs['#box'].adsorb">
				被吸附对象
			</view>
			<view class="box1" @click="showpop" v-else>
				被吸附对象
			</view>
		</view>
		
		<view class="box" @click="showpop" id="c">
			faefwe
		</view> -->
		
		<!-- <zq-load v-model="load"></zq-load> -->
	</zq-page>
</template>

<script>
	export default {
		data() {
			return {
				sudokuList:[
					{name:"气泡按钮",icon:"/static/images/icon/button.png",url:"/pages/index/button/index"},
					{name:"分栏导航栏",icon:"/static/images/icon/subfield.png",url:"/pages/index/subfield/index"},
					{name:"加载动画",icon:"/static/images/icon/load.png"},
					{name:"弹窗",icon:"/static/images/icon/pop.png"},
					{name:"九宫格",icon:"/static/images/icon/sudoku.png"},
					{name:"导航栏",icon:"/static/images/icon/navbar.png"},
					{name:"view盒子",icon:"/static/images/icon/box.png",url:"/pages/index/box/index"},
				],
				load:{
					loadEnd:false,
					length:0,
					loadMore:true,
					loadError:false,
					scope:"body"
				},
				show:false,
				navbarHeight:0,
				title: 'Hello',
				initBtn:[],
				adsorbs:{},
				subfieldIndex1:0,
				subfieldIndex2:1,
				subfieldIndex3:2
			}
		},
		onLoad() {
			let a = {'add':0,'edit':1,'delete':2,'save':3,'code':4,'news':5,'upDate':6,'chart-bar':7,'chart-pie':8,'set':9,'search':10,'sidebar':11,'select':14,'phone':16,'fabulous':17,'share':18,'list':19,'view':20};
			for(let key in a){
				this.initBtn.push({name:key})
			}
			
		},
		methods: {
			getAdsorbs(adsorbs){
				this.adsorbs = adsorbs;
			},
			getNavbarHeight(height){
				this.navbarHeight = height;
			},
			getSearch(e){
				console.log(e)
			},
			showpop(){
				uni.showModal({
					title:"温馨提示",
					content:"发射点发射点",
					success: (res) => {
						console.log(res)
					}
				})
			}
		}
	}
</script>

<style>
	.box1{width: 100%;height: 200px;background: green;transition: all 0.3s;}
	.box{width: 100%;height: 2000px;background: red;}
</style>